﻿using System;
using BP.DA;
using BP.En;
using NPOI.SS.Formula.Functions;

namespace BP.WF.CCFast.Third.GoView
{
    /// <summary>
    /// 操作员 属性
    /// </summary>
    public class GoviewProjectDataAttr : BP.En.EntityNoNameAttr
    {
        /**
          * 项目ID
          */
        public const string ProjectId = "ProjectId";
        /**
	     * 创建时间
	     */
        public const string CreateTime = "CreateTime";
        /**
	     * 创建用户id
	     */
        public const string CreateUserId = "CreateUserId";
        /**
	     * 内容
	     */
        public const string Content = "Content";
    }
    /// <summary>
    /// 操作员 的摘要说明。
    /// </summary>
    public class GoviewProjectData : EntityMyPK
    {
        #region 扩展属性

        public string ProjectId
        {
            get
            {
                return this.GetValStrByKey(GoviewProjectDataAttr.ProjectId);
            }
            set
            {
                this.SetValByKey(GoviewProjectDataAttr.ProjectId, value);
            }
        }
        public string CreateTime
        {
            get
            {
                return this.GetValStrByKey(GoviewProjectDataAttr.CreateTime);
            }
            set
            {
                this.SetValByKey(GoviewProjectDataAttr.CreateTime, value);
            }
        }
        public string CreateUserId
        {
            get
            {
                return this.GetValStrByKey(GoviewProjectDataAttr.CreateUserId);
            }
            set
            {
                this.SetValByKey(GoviewProjectDataAttr.CreateUserId, value);
            }
        }

        public string Content
        {
            get
            {
                return this.GetValStrByKey(GoviewProjectDataAttr.Content);
            }
            set
            {
                this.SetValByKey(GoviewProjectDataAttr.Content, value);
            }
        }



        #endregion

        #region 构造函数

        public GoviewProjectData()
        {
        }
        /** 
	     登录记录
	    */
        public override UAC HisUAC
        {
            get
            {
                UAC uac = new UAC();
                uac.OpenForSysAdmin();
                return uac;
            }
        }
        /** 
	    登录记录
	     @param pkval
	    */
        public GoviewProjectData(string pkval) : base(pkval) { }

        /// <summary>
        /// 重写基类方法
        /// </summary>
        public override Map EnMap
        {
            get
            {
                if (this._enMap != null)
                    return this._enMap;

                Map map = new Map("goview_projectdatas", "项目数据");
                map.setEnDesc("项目数据");

                map.AddMyPK();

                map.AddTBString(GoviewProjectDataAttr.ProjectId, null, "项目ID", false, false, 0, 200, 10);
                map.AddTBString(GoviewProjectDataAttr.CreateTime, null, "创建时间", true, false, 0, 200, 50);
                map.AddTBString(GoviewProjectDataAttr.CreateUserId, null, "创建用户", true, false, 0, 200, 70);
                map.AddTBStringDoc(GoviewProjectDataAttr.Content, "", "内容", false, false, false);

                this._enMap = map;
                return this._enMap;
            }
        }
        /// <summary>
        /// 获取集合
        /// </summary>
        public override Entities GetNewEntities
        {
            get { return new GoviewProjectDatas(); }
        }
        #endregion 构造函数
    }

    public class GoviewProjectDatas : EntitiesMyPK
    {
        #region 构造方法
        /// <summary>
        /// 得到它的 Entity 
        /// </summary>
        public override Entity GetNewEntity
        {
            get
            {
                return new GoviewProjectData();
            }
        }
        /// <summary>
        /// 操作员s
        /// </summary>
        public GoviewProjectDatas()
        {
        }

        #endregion 构造方法

        #region 为了适应自动翻译成java的需要,把实体转换成List.
        /// <summary>
        /// 转化成 java list,C#不能调用.
        /// </summary>
        /// <returns>List</returns>
        public System.Collections.Generic.IList<GoviewProjectData> ToJavaList()
        {
            return (System.Collections.Generic.IList<GoviewProjectData>)this;
        }
        /// <summary>
        /// 转化成list
        /// </summary>
        /// <returns>List</returns>
        public System.Collections.Generic.List<GoviewProjectData> Tolist()
        {
            System.Collections.Generic.List<GoviewProjectData> list = new System.Collections.Generic.List<GoviewProjectData>();
            for (int i = 0; i < this.Count; i++)
            {
                list.Add((GoviewProjectData)this[i]);
            }
            return list;
        }
        #endregion 为了适应自动翻译成java的需要,把实体转换成List.
    }
}
